package jmine.tec.web.wicket.component;

import org.apache.wicket.behavior.IBehavior;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;

/**
 * Label em formato de Panel para poder adicionar em outros lugares
 * 
 * @author Rafael Volpato
 * @date Dec 27, 2011
 */
public class InlinedLabel extends Panel {

    private final Label component;

    /**
     * C'tor
     * 
     * @param id String
     * @param label label
     */
    public InlinedLabel(String id, String label) {
        super(id);
        this.component = new Label("label", label);
        this.add(this.component);
    }

    /**
     * Adiciona os {@link IBehavior} ao Label;
     * 
     * @param behaviors behaviors
     * @return this
     */
    public InlinedLabel addToLabel(IBehavior... behaviors) {
        this.component.add(behaviors);
        return this;
    }
}
